import api from '@/utils/request'

export default class roomApi {

    /**
     * @description 创建房间
     * @param data
     */
    static create = (data: any) => api({
        url: '/room/create/', // 请求地址
        method: 'post',
        data
    })

    /**
     * @description 获取房间列表
     * @param data
     */
    static fetchList = (data: any) => api({
        url: '/room/list/', // 请求地址
        method: 'get',
        params: data
    })

    /**
     * @description 获取房间列表 携带类型信息
     * @param data
     */
    static fetchListJoinType = (data: any) => api({
        url: '/room/list-join-type/', // 请求地址
        method: 'get',
        params: data
    })

    /**
     * @description 房间查询
     * @param data
     */
    static list = (data: any) => api({
        url: '/room/list/', // 请求地址
        method: 'get',
        params: data
    })

    /**
     * @description 修改
     * @param data
     */
    static edit = (data: any) => api({
        url: '/room/edit/', // 请求地址
        method: 'post',
        data
    })


}